package com.zjj.learn.algorithmPlus.segment1.priorityQueue;

/**
 * 定义一个学生类，实现了优先级接口
 * 每一个学生都有相应的优先级
 *
 * @author zjj_admin
 */
public class Student implements Priority {
    private String name;
    private int priority;

    public Student(String name, int priority) {
        this.name = name;
        this.priority = priority;
    }

    @Override
    public int priority() {
        return this.priority;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", priority=" + priority +
                '}';
    }
}
